class Solution
{
public:
    int maximumGroups(vector<int> &grades)
    {
        int total = grades.size();
        int groupCount = floor(((-1.0 + sqrt(1.0 + 8.0 * total)) / 2.0));
        return groupCount;
    }
};